module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  outputDir: 'dist',
  productionSourceMap: false,
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          require('postcss-pxtorem')({
            rootValue: 37.5,
            propList: ['*'],
            exclude: /node_modules/
          }),
        ],
      },
    },
  },
  devServer: {
    open: true,
    port: 8080,
    proxy: {
      '/api': {
        target: 'http://172.20.10.13:9900/api',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/'
        }
      }
    }
  },
};
